package Server;

import java.awt.event.KeyEvent;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

public class menu extends JMenuBar {
	/**
	 * Adds a JMenuBar to the JFrame.
	 * 
	 * @return JMenuBar
	 * @author Thomas Felder
	 */
	protected JMenuItem rst_Server;
	protected JMenuItem close_Application;
	protected JMenuItem about_us;
	protected JMenuItem website;

	public JMenuBar createMenu() {
		JMenuBar menu_Bar = new JMenuBar();

		JMenu file_Menu = new JMenu("File");
		rst_Server = new JMenuItem("Restart Server");
		close_Application = new JMenuItem("Exit");
		file_Menu.add(rst_Server);
		file_Menu.add(close_Application);
		file_Menu.setMnemonic(KeyEvent.VK_F);

		JMenu extra_Menu = new JMenu("Extra");
		about_us = new JMenuItem("About us");
		website = new JMenuItem("Website");

		extra_Menu.add(about_us);
		extra_Menu.add(website);
		extra_Menu.setMnemonic(KeyEvent.VK_E);

		menu_Bar.add(file_Menu);
		menu_Bar.add(extra_Menu);

		return menu_Bar;
	}

}
